<?php
/**
 * @Author: feidao@ibantang.com, 2019, all rights reserved
 * @Date: 2019-05-30
 * @Time: 21:15
 * @Brief:
 */

namespace Core\Common\Model;

use Illuminate\Database\Capsule\Manager;

//use Illuminate\Database\DatabaseManager;

/**
 * 提供连接池降级方案
 * Class CapsuleManager
 * @package Core\Common\Model
 */
class CapsuleManager extends Manager
{
    /**
     * Build the database manager instance.
     *
     * @return void
     */
    protected function setupManager()
    {
        $factory = new ConnectionFactory($this->container);
        $this->manager = new DatabaseManager($this->container, $factory);
    }
}
